function resetLogin(){
	$('#userName').val('');
	$('#password').val('');
}
function login(){

	var pass =$("#password").val();	
	$("#password").val(hex_md5(pass).toUpperCase());
	$('#form1').submit();
}
$(function(){
	var container = $('div.container');
	// validate the form when it is submitted
	var validator = $("#form1").validate({
		errorContainer: container,
		errorLabelContainer: $("ol", container),
		wrapper: 'li',
		meta: "validate",
		rules: {
		     "userName":{
		      required: true, 
		      maxlength:50
		     },
		     "password":{
		      required: true, 
		      maxlength:50
		     }
	    },
	    
	    messages:{
	    	"userName":{
	    		required: "请输入用户名！",
	    		maxlength: "最大不能超过50个字符"
	    	},
	    	"password":{
	    		required: "请输入密码！",
	    		maxlength: "最大不能超过50个字符"
	    	}
	    }
		
	});
})